package edu.sctu.zhangwang.month201506.day20150628;

import com.alibaba.fastjson.JSONObject;

/**
 * Created by Administrator on 2015/6/28.
 */
public class Json2 {
    public static void main(String[] args) {
        String str = "{\"error\":0,\"message\":\"success\",\"count\":\"39\",\"list\":[{\"id\":1,\"name\":\"chen\"}]}";
        JsonAp jsonAp = JSONObject.parseObject(str,JsonAp.class);
        System.out.println(jsonAp.count);
        System.out.println(jsonAp.list.get(0).name);
    }
}
//"{\"error\":0,\"message\":\"success\",\"count\":\"39\",\"list\":[{\"id\":1,\"name\":\"chen\"}]}"